using System;

namespace NWrapper
{
    /// <summary>
    /// Helper methods for exception handling.
    /// </summary>
	public static class ExceptionHelper
	{
        /// <summary>
        /// Throws an <see cref="ArgumentNullException"/> if any of the given parameters are null.
        /// </summary>
        /// <param name="objects">The objects to test.</param>
		public static void AssertIfNull(params object[] objects)
		{
			foreach (object obj in objects)
			{
				if (obj == null)
					throw new ArgumentNullException(obj.GetType().ToString());
			}
		}
	}
}
